.TH "WHOIS" "1" "2019-12-30" "Marco d'Itri" "Debian GNU/Linux"
.SH NAME
whois \- client for the whois directory service
.SH SYNOPSIS
.B whois
[
.RB {\~ \-h \~|\~ \-\-host \~}
.I HOST
] [
.RB {\~ \-p \~|\~ \-\-port \~}
.I PORT
] [\~\c
.B \-abBcdGHIKlLmMrRx
] [\~\c
.BI \-g \~SOURCE:FIRST\-LAST
] [\~\c
.BR \-i \~
.IR ATTR [, ATTR ]...\~]
[\~\c
.BR \-s \~
.IR SOURCE [, SOURCE ]...\~]
[\~\c
.BR \-T \~
.IR TYPE [, TYPE ]...\~]
.RB [\~ \-\-verbose \~]
.RB [\~ \-\-no\-recursion \~]
.I OBJECT

.B whois
.B \-q
.I KEYWORD

.B whois
.B \-t
.I TYPE

.B whois
.B \-v
.I TYPE

.B whois \-\-help

.B whois \-\-version

.SH DESCRIPTION
.B whois
searches for an object in a
.I RFC 3912
database.
.P
This version of the whois client tries to guess the right server to
ask for the specified object. If no guess can be made it will connect to
.I whois.networksolutions.com
for NIC handles or
.I whois.arin.net
for IPv4 addresses and network names.
.SH OPTIONS
.TP 8
.B \-h \c
.IR HOST ,
.BI \-\-host= HOST
Connect to
.IR HOST .
.TP 8
.B \-H
Do not display the legal disclaimers that some registries like to show you.
.TP 8
.B \-p \c
.IR PORT ,
.BI \-\-port= PORT
Connect to
.IR PORT .
.TP 8
.B \-I
First query
.I whois.iana.org
and then follow its referral to the
whois server authoritative for that request. This works for IP addresses,
AS numbers and domains.
.BR BEWARE :
this implies that the IANA server will receive your complete query.
.TP 8
.B \-\-no\-recursion
Disable recursion from registry to registrar servers.
.TP 8
.B \-\-verbose
Be verbose.
.TP 8
.B \-\-help
Display online help.
.TP 8
.B \-\-version
Display the program version.
.P
Other options are flags understood by
.I whois.ripe.net
and some other
RIPE-like servers:
.TP 8
.B \-a
Also search all the mirrored databases.
.TP 8
.B \-b
Return brief IP address ranges with abuse contact.
.TP 8
.B \-B
Disable objects filtering.
(Show the e-mail addresses.)
.TP 8
.B \-c
Return the smallest IP address range with a reference to an irt object.
.TP 8
.B \-d
Return the reverse DNS delegation object too.
.TP 8
.B \-g \c
.I SOURCE:FIRST\-LAST
Search updates from
.I SOURCE
database between
.I FIRST
and
.I LAST
update serial number. It is useful to obtain Near Real Time Mirroring stream.
.TP 8
.B \-G
Disable grouping of associated objects.
.TP 8
.B \-i \c
.IR ATTR [, ATTR ]...
Inverse-search objects having associated attributes.
.I ATTR
is the attribute name, while the positional
.I OBJECT
argument is the attribute value.
.TP 8
.B \-K
Return primary key attributes only. An exception is the
.I members
attribute of
.I set
objects, which is always returned. Another exception are all
attributes of the objects
.IR organisation ,
.I person
and
.IR role ,
that are never returned.
.TP 8
.B \-l
Return the one level less specific object.
.TP 8
.B \-L
Return all levels of less specific objects.
.TP 8
.B \-m
Return all one level more specific objects.
.TP 8
.B \-M
Return all levels of more specific objects.
.TP 8
.B \-q \c
.I KEYWORD
Return information about the server.
.I KEYWORD
can be
.I version
for the server version,
.I sources
for the list of database sources or
.I types
for the list of supported object types.
.TP 8
.B \-r
Disable recursive lookups for contact information.
.TP 8
.B \-R
Disable following referrals and force showing the object from the local copy
in the server.
.TP 8
.B \-s \c
.IR SOURCE [, SOURCE ]...
Request the server to search for objects mirrored from
.IR SOURCE .
Sources are delimited by comma, and the order is significant.
Use the
.I \-q sources
parameter to obtain a list of valid sources.
.TP 8
.B \-t \c
.I TYPE
Return the template for a object of
.IR TYPE .
.TP 8
.B \-T \c
.IR TYPE [, TYPE ]...
Restrict the search to objects of
.IR TYPE .
Multiple types are separated by a comma.
.TP 8
.B \-v \c
.I TYPE
Return the verbose template for a object of
.IR TYPE .
.TP 8
.B \-x
Search for only exact match on network address prefix.
.SH NOTES
When querying the Verisign gTLDs (e.g.\& \&.com, \&.net...\&) thin registry servers
for a domain, the program will automatically prepend the
.I domain
keyword to only show domain records.  The
.I nameserver
or
.I registrar
keywords must be used to show other kinds of records.
.P
When querying
.I whois.arin.net
for IPv4 or IPv6 networks, the CIDR
netmask length will be automatically removed from the query string.
.P
When querying
.I whois.nic.ad.jp
for AS numbers, the program will automatically convert the request
in the appropriate format, inserting a space after the string
.IR AS .
.P
When querying
.I whois.denic.de
for domain names and no other
flags have been specified, the program will automatically add the flag
.IR "\-T dn" .
.P
When querying
.I whois.dk\-hostmaster.dk
for domain names and no other
flags have been specified, the program will automatically add the flag
.IR "\-\-show\-handles" .
.P
RIPE-specific command line options are ignored when querying non-RIPE
servers. This may or may not be the behaviour intended by the user.
When using non-standard query parameters then the command line options
which are not to be interpreted by the client must follow the
.I \-\-
separator (which marks the beginning of the query string).
.P
If the
.I /etc/whois.conf
configuration file exists, it will be consulted
to find a server before applying the normal rules. Each line of the
file should contain a regular expression to be matched against the query
text and the whois server to use, separated by white space.
IDN domains must use the ACE format.
.P
The whois protocol does not specify an encoding for characters which
cannot be represented by ASCII and implementations vary wildly.
If the program knows that a specific server uses a certain encoding,
if needed it will transcode the server output to the encoding specified
by the current system locale.
.P
Command line arguments will always be interpreted accordingly to the
current system locale and converted to the IDN ASCII Compatible Encoding.
.SH "FILES"
/etc/whois.conf
.SH "ENVIRONMENT"
.IP LANG
When querying
.I whois.nic.ad.jp
and
.I whois.jprs.jp
English text is requested unless the
.I LANG
or
.I LC_MESSAGES
environment variables specify a Japanese locale.
.IP "WHOIS_OPTIONS"
A list of options which will be evaluated before the ones specified on the
command line.
.IP "WHOIS_SERVER"
This server will be queried if the program cannot guess where some kind
of objects are located. If the variable does not exist then
.I whois.arin.net
will be queried.
.SH "SEE ALSO"
.IR whois.conf (5).
.P
.IR "RFC 3912" :
WHOIS Protocol Specification.
.P
.IR "RIPE Database Query Reference Manual" :
.RI < https://www.ripe.net/data\-tools/support/documentation/ripe\-database\-query\-reference\-manual >
.SH BUGS
The program may have buffer overflows in the command line parser:
be sure to not pass untrusted data to it.
It should be rewritten to use a dynamic strings library.
.SH HISTORY
This program closely tracks the user interface of the whois client
developed at RIPE by Ambrose Magee and others on the base of the
original BSD client.
.SH AUTHOR
.B Whois
and this man page were written by Marco d'Itri
.RI < md@linux.it >
and are licensed under the terms of the GNU General Public License,
version 2 or later.
\" SPDX-License-Identifier: GPL-2.0-or-later
